<template>
  <div id="app">
    <el-tabs type="card">
      <el-tab-pane v-for="(page,idx) in pages" :key="idx" :label="page.label">
        <component
          :is="page.page"
        ></component>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import RegisterPage from '@/pages/RegisterPage'
import LoginPage from '@/pages/LoginPage'
import ModifyPage from '@/pages/ModifyPage'
import ListPage from '@/pages/ListPage'

export default {
  name: 'App',
  components: {
    RegisterPage,
    LoginPage,
    ModifyPage,
    ListPage
  },
  data() {
   return {
     pages: [
       {label: '注册', page: 'RegisterPage'},
       {label: '登录', page: 'LoginPage'},
       {label: '修改', page: 'ModifyPage'},
       {label: '查询', page: 'ListPage'}
     ],
     drawer: false
   } 
  }
}
</script>

<style>

</style>
